package by.scsbsu.resources.managers;

import javax.servlet.http.Cookie;

public class CookiesManager {

	// max cookies age = 7 days
	private static final int MAX_AGE = 60 * 60 * 24 * 7;
	
	public static final String C_K_USER = "scs_bsu_user";
	public static final String C_K_PASS = "scs_bsu_password";
	public static final String C_K_SAVE = "remember_me";
	
	
	public static synchronized Cookie createCookie(String key, String value) {
		Cookie cookie = new Cookie(key, value);
		cookie.setMaxAge(MAX_AGE);
		return cookie;
	}
}
